// import axios from 'axios';
import axios from "./http";
import type * as Type from './processClient.d';

const preFix = 'aaa';
// 获取序列影像信息
export function getTranfer(params: Type.TranFerParams) {
  return axios.post<Type.TranFerResponse>(preFix + "/v1/sys/transfer", params);
}

// 获取序列名称
export function getSeriesName(id: string) {
  return axios.post<Type.SeriesNameResponse>(preFix + "/v1/audit/task/read", {id});
}

// 获取审核序列
export function getSeries(params: Type.SeriesParams) {
  return axios.post<Type.SeriesResponse>(preFix + "/v1/anno/user/series/get", params);
}

// 获取审核结果
export function getSeriesResult(params: Type.SeriesResultParams) {
  return axios.post<Type.SeriesResultResponse>(preFix + "/v1/audit/task/series/read", params);
}

// 修改病灶的审核状态
export function updateLesionStatus(params: Type.UpdateLesionStatusParams) {
  return axios.post<Type.CommonResponse>(preFix + "/v1/audit/task/image/result/audit/status", params);
}

// 修改金标病灶结果(点位)
export function updateGoldResultPoint(params: Type.UpdateGoldResultPointParams) {
  return axios.post<Type.CommonResponse>(preFix + "/v1/audit/task/image/gold/result/update", params);
}

// 修改金标病灶结果(mask)
export function updateGoldResultMask(params: Type.UpdateGoldResultMaskParams) {
  return axios.post<Type.CommonResponse>(preFix + "/v1/audit/task/image/gold/result/update3", params);
}

// 创建金标病灶结果(点位)
export function createGoldPoint(params: Type.CreateGoldPointParams) {
  return axios.post<Type.CreateGoldPointResponse>(preFix + "/v1/audit/task/image/gold/result/component/result/create", params);
}

// 创建金标病灶结果(mask)
export function createGoldMask(params: Type.CreateGoldMaskParams) {
  return axios.post<Type.CreateGoldMaskResponse>(preFix + "/v1/audit/task/image/gold/result/create3", params);
}

// 审核标注征象(小征象)结果
export function saveMinSign(params: Type.SaveMinSignParams) {
  return axios.post<Type.SaveMinSignResponse>(preFix + "/v1/audit/task/component/result/create", params);
}

// 删除金标病灶结果
export function delGoldResult(params: Type.DelGoldResultParams) {
  return axios.post<Type.CommonResponse>(preFix + "/v1/audit/task/image/gold/result/delete", params);
}

// 审核序列征象(大征象)结果
export function saveBigSign(params: Type.SvaeBigSignParams) {
  return axios.post<Type.CommonResponse>(preFix + "/v1/audit/series/component/result/update", params);
}

// 审核位置
export function savePosition(params: Type.SavePositionParams) {
  return axios.post<Type.CommonResponse>(preFix + "/v1/audit/task/image/result/audit2", params);
}

// 标记废片
export function saveReject(params: Type.RejectParams) {
  return axios.post<Type.CommonResponse>(preFix + "/v1/anno/series_result/discard", params);
}

// 获取废片原因集合
export function getDiscardList(params: Type.RejectListParams) {
  return axios.post<Type.RejectListResponse[]>(preFix + "/v1/project/discard/list", params);
}

// 标记阴阳性
export function updateYay(params: Type.YayParams) {
  return axios.post<Type.CommonResponse>(preFix + "/v1/anno/series_result/yayAttributes", params);
}

// 最终提交
export function saveData(params: Type.SubmitParams) {
  return axios.post<Type.CommonResponse>(preFix + "/v1/anno/series_result/submit", params);
}

// 获取剩余可分配的序列
export function getSurPlusSeries(params: Type.SurPlusSeriesParams) {
	return axios.post<Type.SurPlusSeriesResponse>(preFix + "/v1/user/task/currentList", params);
}

// 非开始任务模式下获取序列
export function seriesResultSearch( model: any ){
	return axios.post("aaa/v1/anno/series_result/search", model)
}

// 获取已标注的序列
export function getSeiesList(params: any) {
	return axios.post("/aaa/v1/task/user/series/search", params);
}

// 获取数据字典
export function getDict(params: Type.DictParams) {
  return axios.post(preFix + "/v1/dict/child/query", params);
}